module spark_cubed_sphere

  use string
  use flogger
  use container
  use kinds_mod
  use mesh_const_mod
  use mesh_math_mod
  use cubed_sphere_math_mod
  use cubed_sphere_mesh_mod
  use cubed_sphere_domain_mod
  use cubed_sphere_halo_mod
  use cubed_sphere_process_mod
  use cubed_sphere_parallel_mod
  use cubed_sphere_array_mod
  use cubed_sphere_domain_array_mod
  use cubed_sphere_objects

contains

  subroutine spark_init_cubed_sphere()

    call spark_final_cubed_sphere()

    allocate(proc, mesh)

  end subroutine spark_init_cubed_sphere

  subroutine spark_final_cubed_sphere()

    if (allocated(proc)) deallocate(proc)
    if (allocated(mesh)) deallocate(mesh)

  end subroutine spark_final_cubed_sphere

end module spark_cubed_sphere
